app.controller('riskCtrl',['$scope','$rootScope','pcdService','listSve',function($scope,$rootScope,pcdService,listSve){
	$rootScope.navIndex = 4;
	//获取省列表
	$scope.getPro = function() {
		pcdService.prolist().list().then(function(e) {
			$scope.prolist = e.data;
		})
		pcdService.citylist().list().then(function(e) {
			$scope.oCityList = e.data;
		})
		pcdService.dislist().list().then(function(e) {
			$scope.oDisList = e.data;
		})
	}
	$scope.getPro();
	
	var pagerBox_5 = document.getElementById('pager_5');
	//列表
    $scope.getItem = function(){
    
        listSve.fList().list({numPerPage:20}).then(function(e) {
        	console.info(e);
          $scope.list = e.res.data;
           var count = Math.ceil(e.res.page.recordCount/20);
          $scope.count = count;
           var pager = new Pager({
			index: 1,
			total: $scope.count,
			parent: pagerBox_5,
			onchange: doChangePage_5
			});
        });
        
        
        
    }
    var first_1 = true;
	$scope.getItem();
	
	
	//分页器
		function doChangePage_5(obj) {
				if (first_1){
						first_1 = false;
					}else{
						console.info(obj.index)
						$scope.pageInx = {pageNum:obj.index,numPerPage:20};
		//				$scope.getItem();
					 listSve.fList().list($scope.pageInx).then(function(e) {
					        	console.info(e);
					            $scope.list = e.res.data;
					
							})
					 }
				}
	
	
}]);